package com.chilly.designpattern.event;

import org.springframework.context.ApplicationEvent;

/**
 * Created by Chilly Cui on 2020/11/18.
 */
// 定义一个事件,继承自ApplicationEvent并且写相应的构造函数
public class DemoEvent extends ApplicationEvent {

    private String message;

    public DemoEvent(Object source,String message) {
        super(source);
        this.message = message;
    }

    public String getMessage() {
        return message;
    }
}
